<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <link rel="icon" href="img/favicon.jpeg">
    <title>FPGA实验管理系统-注册界面</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">

    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<style type="text/css">
    body{
        position:absolute;
        width: 100%;
        height: 100%;
        background: url(../img/aiqinhai.jpeg) no-repeat;
        -webkit-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }
    .tx{
        font-size:30px;
        font-family: '华文仿宋';
    }
    .well{
        background:rgba(192,192,192,0.7);
    }
    .row { margin-top:10%; }
    .a{color:white;}
</style>
<script>
    function checkInput(obj) {
        var val = obj.value;
        if(val == "") {
            return false;
        } else {
            return true;
        }
    }
    //提交校验
    function dosubmit() {
        var input1 = checkInput(document.getElementById('username'));
        var input2 = checkInput(document.getElementById('tel'));
        if (input1 && input2) {
        } else {
            alert("输入不能为空");
        }
    }
    $(function() {
        $("#tel").focusout(function() {
            var tel = /^1[3578]\d{9}$/
            if (!tel.test($(this).val())) {
                $("#form_tel").prop("class", "form-group has-error");
                $("button[type='submit']").prop("disabled", true);
            } else {
                $("#form_tel").prop("class", "form-group");
                $("button[type='submit']").prop("disabled", false);
            }
        })

        $("#submit").click(function() {
            $(".form-horizontal").submit();
        })

    })
</script>
<body>
<div class="container-fluid login">
        <div class="row">
            <p class="tx" style="text-align:center">密码找回</p>
            <div class="col-md-4"></div>
            <div class="well well-sm col-md-4">
                <%--<p class="txt" style="text-align:center">请输入您的账号和手机号</p>--%>

                <div class="form-login">

                <span style="color:red">${message}</span>
                    <form action="<%=request.getContextPath()%>/user_retrieve" class="form-horizontal" role="form">
                    <div class="form-group">
                        <%--@declare id="secondname"--%>
                            <%--<p class="txt" style="text-align:left">请输入您的账号和手机号</p>--%>
                        <label for="secondname" class="col-sm-2 control-label">账号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="username"
                                   id="username" placeholder="请输入账号"> <span id="message"></span>
                        </div>
                    </div>

                    <div class="form-group" id="form_tel">
                        <label for="tel" class="col-sm-2 control-label">电话</label>
                        <div class="col-sm-10">
                            <input type="text"  class="form-control" name="tel" id="tel"
                                   placeholder="请输入电话">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3"></div>
                        <div class="col-md-4">
                            <button id="sumbit" type="submit" class="btn btn-primary" onclick="dosubmit()">确定</button>
                        </div>
                        <div class="col-md-4">
                            <button  class="btn btn-primary" ><a class="a" href="fpga_index.jsp">退出</a></button>
                        </div>
                    </div>
                </form>
            </div>

        </div>

    </div>
</div>
</body>
</html>